<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>InkType Administration Panel</title>

<link href="<?=$this->css_dir;?>admin/css/styles.css" rel="stylesheet" type="text/css" />

<script src="<?=base_url();?>assets/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

<script src="<?=$this->css_dir;?>admin/js/jquery.checkbox_toggle.js" type="text/javascript"></script>

<?$this->load->view('admin/header_tabs');?>

<?

if ($this->uri->segment(2) == 'form') {
	if ($this->session->userdata('meta_content_editor') == 1) {
		$this->load->view('admin/header_markitup');
	} elseif ($this->session->userdata('meta_content_editor') == 2) {
		$this->load->view('admin/header_xinha');
	}
}

?>

</head>
<body>

<div id="wrapper">
        <!-- Header -->
        <div id="header">
                <div class="logo"> <img src="<?=$this->css_dir;?>admin/images/logo.png" width="283" height="135" alt="InkType" /> <span> Welcome <?=$this->session->userdata('display_name');?> / <?=anchor('sessions/logout', 'Log Out');?>
                        <br />
                        <?if ($this->session->userdata('last_login')) {?>
                        <small>Last login at <strong><?=date('h:i A', $this->session->userdata('last_login'));?> </strong> <?=date('M d, Y', $this->session->userdata('last_login'));?> </small> 
                        <?} else {?>
                        <small>Last login <strong>[ Never ]</strong></small> 
                        <?}?>
                        <?if ($this->inktype_system->user_is_global()) {?>
                        <br />
                        <small>Site Switcher:
                        <?=form_open('admin_sites/switch_site', array('style'=>'display: inline;'));?>
                        	<select name="site_id" style="font-size: .8em;" onchange="submit();">
                        		<?foreach ($this->mdl_sites->get() as $site) {?>
									<option value="<?=$site->site_id;?>" <?if($this->session->userdata('site_id') == $site->site_id){?>selected<?}?>><?=$site->site_name;?></option>
                        		<?}?>
                        	</select>
                        	
                        </form></small>
                        <?}?>
                        </span> </div>
                        
        </div>
        <!-- Header -->
        <!-- Menu -->
        <div id="menu">
            <div id="Navigation">
				<?$this->load->view('admin/header_menu');?>
                    <span class="visit"><a href="<?=$this->session->userdata('current_site_url');?>" target="_blank"> <img src="<?=$this->css_dir;?>admin/images/visitsite.gif" width="92" height="26" /></a></span>
			</div>
        </div>
        <!-- Menu -->
        <div style="clear:both"></div>